Skip to content

fix: resolve directory names for groups in favorites add - #23

Merged
aaearon merged 1 commit into
mainfrom
fix/favorites-add-directory-name-resolution
Feb 19, 2026
Merged

fix: resolve directory names for groups in favorites add#23
aaearon merged 1 commit into
mainfrom
fix/favorites-add-directory-name-resolution

Conversation

@aaearon

@aaearon aaearon commented Feb 19, 2026

Copy link
Copy Markdown
Owner

Summary

  • grant favorites add was calling ListGroupsEligibility directly in both the unified interactive path and the --type groups path, bypassing the fetchGroupsEligibility helper that enriches groups with directory names via buildDirectoryNameMap
  • Groups displayed as Group: X (azure) instead of Directory: Y / Group: X (azure), inconsistent with the root command
  • Replaced both raw calls with fetchGroupsEligibility, added nil guard to buildDirectoryNameMap for graceful degradation

Test plan

  • make test — all existing and new tests pass
  • make build && ./grant favorites add — groups show Directory: X / Group: Y (azure) format
  • ./grant — same format, confirming parity with root command

favorites add was calling ListGroupsEligibility directly, bypassing the
directory name enrichment that fetchGroupsEligibility provides. Groups
displayed as "Group: X (azure)" instead of "Directory: Y / Group: X (azure)".

- Replace raw ListGroupsEligibility calls with fetchGroupsEligibility in
  both the unified interactive path and the --type groups path
- Add eligLister param to addGroupFavorite for buildDirectoryNameMap
- Add nil guard to buildDirectoryNameMap for graceful degradation
- Add tests verifying directory name enrichment and nil eligLister fallback
@aaearon
aaearon merged commit 0773864 into main Feb 19, 2026
1 check passed
@aaearon
aaearon deleted the fix/favorites-add-directory-name-resolution branch February 19, 2026 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant